package com.car.service.impl;

import com.car.dao.ProductMapper;

import com.car.entity.Kind;
import com.car.entity.Product;
import com.car.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("productService")
public class ProductService implements IProductService {
    @Autowired
    @Qualifier("productMapper")
    private ProductMapper productMapper;

    @Override
    public List<Product> findProduct() {
        return productMapper.findProduct();
    }

    @Override
    public int updateStatus(Product product) {
        return productMapper.updateStatus(product);
    }

    @Override
    public int deleteProduct(int pid) {
        return productMapper.deleteProduct(pid);
    }

    @Override
    public Product findProductById(int pid) {
        return productMapper.findProductById(pid);
    }

    @Override
    public int updateProduct(Product product) {
        return productMapper.updateProduct(product);
    }

    @Override
    public int addProduct(Product product) {
        return productMapper.addProduct(product);
    }

    @Override
    public List<Product> findKind() {
        return productMapper.findKind();
    }

    @Override
    public List<Product> findXH() {
        return productMapper.findXH();
    }

    @Override
    public int addXH(Product product) {
        return productMapper.addXH(product);
    }

    @Override
    public int updateRUKU(Product product) {
        return productMapper.updateRUKU(product);
    }

    @Override
    public int updateCHUKU(Product product) {
        return productMapper.updateCHUKU(product);
    }

    @Override
    public List<Product> findCR() {
        return productMapper.findCR();
    }

    @Override
    public List<Product> selectCR(String regtime, String churegtime, String sx) {
        return productMapper.selectCR(regtime, churegtime, sx);
    }

    @Override
    public int updateDigit(Product product) {
        return productMapper.updateDigit(product);
    }

}
